<template>
  <div class="table_caozuo">
    <template v-for="(item,index) in btn">
      <el-button :key="index" @click="handler(index)" v-if="item.isShow">{{item.title}}</el-button>
    </template>
    <avue-crud
      ref="crud"
      style="width:100%"
      :page.sync="page"
      :data="loadData"
      :option="tableOption"
      :table-loading="loading"
      @selection-change="selectionChange"
      @size-change="sizeChange"
      @current-change="currentChange"
    >
      <template slot-scope="scope" slot="indexLabel">
        <span>{{scope.row.$index+(page.current - 1) * page.size + 1}}</span>
      </template>
      <template slot="suplierInfoList" slot-scope="scope">
        <span
          v-for="(item,index) in scope.row.suplierInfoList"
          :key="index"
        >{{item.companyName + ((scope.row.suplierInfoList.length - 1 == index)?'':'、')}}</span>
      </template>
      <template slot="goodsPic" slot-scope="scope">
        <el-image
          style="width: 50px; height: 50px"
          :src="scope.row.goodsPic"
          :preview-src-list="[scope.row.goodsPic]"
        ></el-image>
      </template>
      <template slot="menu" slot-scope="scope">
        <el-button @click="pass(scope.row)" type="text" icon="el-icon-edit">提交审核</el-button>
        <el-button @click="edit(scope.row)" type="text" icon="el-icon-edit">编辑</el-button>
        <el-button @click="del(scope.row)" type="text" icon="el-icon-edit">删除</el-button>
      </template>
    </avue-crud>
  </div>
</template>

<script src='./rejected.js'></script>

<style lang="scss">
</style>